home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / checkt1a / frmtest.frm next >
Text File  |  1999-09-05  |  4KB  |  144 lines

  1. VERSION 5.00
  2. Object = "{48A63D17-6321-11D3-9D68-B4C643584542}#10.0#0"; "TMaxHtml.ocx"
  3. Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
  4. Begin VB.Form FrmTest 
  5.    BorderStyle     =   4  'Fixed ToolWindow
  6.    Caption         =   "THtml Demo"
  7.    ClientHeight    =   3435
  8.    ClientLeft      =   45
  9.    ClientTop       =   285
  10.    ClientWidth     =   6795
  11.    Icon            =   "FrmTest.frx":0000
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   3435
  16.    ScaleWidth      =   6795
  17.    ShowInTaskbar   =   0   'False
  18.    StartUpPosition =   2  'CenterScreen
  19.    Begin HtmlWiz.TMaxHtml TMaxHtml1 
  20.       Left            =   3360
  21.       Top             =   480
  22.       _ExtentX        =   450
  23.       _ExtentY        =   450
  24.    End
  25.    Begin VB.CommandButton CmdView 
  26.       Caption         =   "&View File"
  27.       Height          =   255
  28.       Left            =   1680
  29.       TabIndex        =   6
  30.       Top             =   120
  31.       Width           =   1095
  32.    End
  33.    Begin RichTextLib.RichTextBox rt1 
  34.       Height          =   2535
  35.       Left            =   1680
  36.       TabIndex        =   5
  37.       Top             =   720
  38.       Width           =   5055
  39.       _ExtentX        =   8916
  40.       _ExtentY        =   4471
  41.       _Version        =   393217
  42.       ScrollBars      =   3
  43.       RightMargin     =   10000
  44.       TextRTF         =   $"FrmTest.frx":0442
  45.    End
  46.    Begin VB.ComboBox ComPattern 
  47.       Height          =   315
  48.       Left            =   120
  49.       TabIndex        =   4
  50.       Top             =   3000
  51.       Width           =   1455
  52.    End
  53.    Begin VB.DriveListBox Drive1 
  54.       Height          =   315
  55.       Left            =   120
  56.       TabIndex        =   2
  57.       Top             =   120
  58.       Width           =   1455
  59.    End
  60.    Begin VB.DirListBox Dir1 
  61.       Height          =   765
  62.       Left            =   120
  63.       TabIndex        =   1
  64.       Top             =   480
  65.       Width           =   1455
  66.    End
  67.    Begin VB.FileListBox File1 
  68.       Height          =   1650
  69.       Left            =   120
  70.       OLEDragMode     =   1  'Automatic
  71.       TabIndex        =   0
  72.       Top             =   1320
  73.       Width           =   1455
  74.    End
  75.    Begin VB.Label Lbl1 
  76.       AutoSize        =   -1  'True
  77.       Height          =   195
  78.       Left            =   1680
  79.       TabIndex        =   3
  80.       Top             =   480
  81.       Width           =   45
  82.    End
  83. End
  84. Attribute VB_Name = "FrmTest"
  85. Attribute VB_GlobalNameSpace = False
  86. Attribute VB_Creatable = False
  87. Attribute VB_PredeclaredId = True
  88. Attribute VB_Exposed = False
  89. 'Author : TEH
  90. 'Mailto : tehmax@cyberdude.com
  91. '
  92. 'FrmTest.frm
  93. 'THtml.ocx demostration form.
  94. 'File1_Click - trigger THtml.CheckTitle for HTM(L) or ASP file ONLY.
  95. 'CmdView_Click - convert HTML File to Text File.
  96.  
  97. Public FileSelect$
  98. Private Sub CmdView_Click()
  99. If InStr(1, UCase$(FileSelect$), ".ASP") Or InStr(1, UCase$(FileSelect$), ".HTM") Then
  100.     TMaxHtml1.ConvH2T (FileSelect$)
  101.     rt1.LoadFile TMaxHtml1.H2tFile, rtfText
  102. Else
  103.     rt1.LoadFile FileSelect$, rtfText
  104. End If
  105. End Sub
  106.  
  107. Private Sub ComPattern_Click()
  108. File1.Pattern = ComPattern.List(ComPattern.ListIndex)
  109. End Sub
  110.  
  111. Private Sub Dir1_Change()
  112. File1.Path = Dir1.Path
  113. End Sub
  114.  
  115. Private Sub Drive1_Change()
  116. On Error GoTo DriveError
  117. Dir1.Path = Drive1.Drive
  118. Exit Sub
  119. DriveError:
  120. Drive1.Drive = Dir1.Path
  121. Resume Next
  122. End Sub
  123.  
  124. Private Sub File1_Click()
  125. Lbl1.Caption = ""
  126. If Len(File1.Path) > 3 Then
  127.     FileSelect$ = File1.Path & "\" & File1.List(File1.ListIndex)
  128. Else
  129.     FileSelect$ = File1.Path & File1.List(File1.ListIndex)
  130. End If
  131. Me.Caption = FileSelect$
  132. If InStr(1, UCase$(FileSelect$), ".ASP") Or InStr(1, UCase$(FileSelect$), ".HTM") Then
  133.     Lbl1.Caption = "Title : " & TMaxHtml1.CheckTitle(FileSelect$)
  134. End If
  135. End Sub
  136.  
  137. Private Sub Form_Load()
  138. ComPattern.AddItem "*.*"
  139. ComPattern.AddItem "*.HTM"
  140. ComPattern.AddItem "*.ASP"
  141. ComPattern.ListIndex = 0
  142. End Sub
  143.  
  144.